package com.yunkaweilai.android.view.home;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.ListView;

import com.yunkaweilai.android.R;
import com.yunkaweilai.android.activity.operation.MyOrderListActivity;

import butterknife.BindView;
import butterknife.ButterKnife;


/**
 * Created by sunfusheng on 16/4/20.
 */
public class HeaderDividerView extends AbsHeaderView<String> {

    @BindView(R.id.id_llayout_all_jilu)
    LinearLayout idLlayoutAllJilu;

    public HeaderDividerView(Activity context) {
        super(context);
    }

    @Override
    protected void getView(String s, ListView listView) {
        View view = mInflate.inflate(R.layout.header_divider_layout, listView, false);
        ButterKnife.bind(this, view);
        listView.addHeaderView(view);
        initView();
    }

    private void initView() {
        idLlayoutAllJilu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mActivity.startActivity(new Intent(mActivity, MyOrderListActivity.class));
            }
        });
    }

}
